Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\cubes>mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 187
Server version: 5.5.25a MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use b20;
Database changed
mysql> show tables;
+---------------+
| Tables_in_b20 |
+---------------+
| categories    |
| countries     |
| practice      |
| users         |
+---------------+
4 rows in set (0.02 sec)

mysql> select * from users;
+----+----------------+----------------------------------+------------+---------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
| id | name           | password                         | dob        | email         | gender | address               | lang       | country_id | hobbies        | avatar                        | register_date       | modified_date       | status |
+----+----------------+----------------------------------+------------+---------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
|  3 | Rasmus Lerdorf | d528a42b38301d4eda7792e0419bf853 | 1999-12-12 | zeev@andi.com | 1      | H-231 Sector 22 Noida | cpp,dotnet |          3 | cricket,hockey | 136713093217181Hydrangeas.jpg | 2013-04-28 08:35:32 | 2013-05-05 12:25:30 | 1      |
+----+----------------+----------------------------------+------------+---------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
1 row in set (0.03 sec)

mysql> START TRANSACTION;
Query OK, 0 rows affected (0.00 sec)

mysql> update users set email='test@gmail.com' WHERE `id`=3;
Query OK, 1 row affected (0.14 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from users;
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
| id | name           | password                         | dob        | email          | gender | address               | lang       | country_id | hobbies        | avatar                        | register_date       | modified_date       | status |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
|  3 | Rasmus Lerdorf | d528a42b38301d4eda7792e0419bf853 | 1999-12-12 | test@gmail.com | 1      | H-231 Sector 22 Noida | cpp,dotnet |          3 | cricket,hockey | 136713093217181Hydrangeas.jpg | 2013-04-28 08:35:32 | 2013-05-19 10:50:25 | 1      |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
1 row in set (0.00 sec)

mysql> savepoint flag1;
Query OK, 0 rows affected (0.00 sec)

mysql> update users set email='test@yahoo.com' WHERE `id`=3;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> savepoint flag2;
Query OK, 0 rows affected (0.00 sec)

mysql> ROLLBACK to flag1;
Query OK, 0 rows affected (0.04 sec)

mysql> select * from users;
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
| id | name           | password                         | dob        | email          | gender | address               | lang       | country_id | hobbies        | avatar                        | register_date       | modified_date       | status |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
|  3 | Rasmus Lerdorf | d528a42b38301d4eda7792e0419bf853 | 1999-12-12 | test@gmail.com | 1      | H-231 Sector 22 Noida | cpp,dotnet |          3 | cricket,hockey | 136713093217181Hydrangeas.jpg | 2013-04-28 08:35:32 | 2013-05-19 10:50:25 | 1      |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
1 row in set (0.00 sec)

mysql> ROLLBACK to flag2;
ERROR 1305 (42000): SAVEPOINT flag2 does not exist
mysql> select * from users;
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
| id | name           | password                         | dob        | email          | gender | address               | lang       | country_id | hobbies        | avatar                        | register_date       | modified_date       | status |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
|  3 | Rasmus Lerdorf | d528a42b38301d4eda7792e0419bf853 | 1999-12-12 | test@gmail.com | 1      | H-231 Sector 22 Noida | cpp,dotnet |          3 | cricket,hockey | 136713093217181Hydrangeas.jpg | 2013-04-28 08:35:32 | 2013-05-19 10:50:25 | 1      |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
1 row in set (0.00 sec)

mysql> savepoint flag1;
Query OK, 0 rows affected (0.00 sec)

mysql> update users set email='test@yahoo.com' WHERE `id`=3;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from users;
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
| id | name           | password                         | dob        | email          | gender | address               | lang       | country_id | hobbies        | avatar                        | register_date       | modified_date       | status |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
|  3 | Rasmus Lerdorf | d528a42b38301d4eda7792e0419bf853 | 1999-12-12 | test@yahoo.com | 1      | H-231 Sector 22 Noida | cpp,dotnet |          3 | cricket,hockey | 136713093217181Hydrangeas.jpg | 2013-04-28 08:35:32 | 2013-05-19 10:53:14 | 1      |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
1 row in set (0.00 sec)

mysql> savepoint flag2;
Query OK, 0 rows affected (0.00 sec)

mysql> select * from users;
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
| id | name           | password                         | dob        | email          | gender | address               | lang       | country_id | hobbies        | avatar                        | register_date       | modified_date       | status |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
|  3 | Rasmus Lerdorf | d528a42b38301d4eda7792e0419bf853 | 1999-12-12 | test@yahoo.com | 1      | H-231 Sector 22 Noida | cpp,dotnet |          3 | cricket,hockey | 136713093217181Hydrangeas.jpg | 2013-04-28 08:35:32 | 2013-05-19 10:53:14 | 1      |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
1 row in set (0.00 sec)

mysql> ROLLBACK to flag1;
Query OK, 0 rows affected (0.00 sec)

mysql> select * from users;
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
| id | name           | password                         | dob        | email          | gender | address               | lang       | country_id | hobbies        | avatar                        | register_date       | modified_date       | status |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
|  3 | Rasmus Lerdorf | d528a42b38301d4eda7792e0419bf853 | 1999-12-12 | test@gmail.com | 1      | H-231 Sector 22 Noida | cpp,dotnet |          3 | cricket,hockey | 136713093217181Hydrangeas.jpg | 2013-04-28 08:35:32 | 2013-05-19 10:50:25 | 1      |
+----+----------------+----------------------------------+------------+----------------+--------+-----------------------+------------+------------+----------------+-------------------------------+---------------------+---------------------+--------+
1 row in set (0.00 sec)

mysql> COMMIT;
Query OK, 0 rows affected (0.01 sec)

mysql> ROLLBACK to flag1;
ERROR 1305 (42000): SAVEPOINT flag1 does not exist
mysql>